Hdu 6161 -- Big binary tree (thinking -- compressing space), hdu6161 -- big
Question Link
Problem Description
You are given a complete binary tree with n nodes. the root node is numbered 1, and node x's father node is too x/2 then ⌋. at the beginning, node x has a value of exactly x. we define the value of a path as the sum of all nodes it passes (including two ends, or one if the path only has one node ). now there are two kinds of operations:
1. c
During the development process, we often encounter a value transfer problem, which cannot be disturbed. Today we will write some understandings, and some may be wrong. Please also see the heroes to point out. I have used many books and online examples in this article. I would like to thank you and I will not mention them one by one.
1. define the concept in the question first.
(1) JSP script: in some cases, it is also called a Java Script, which i
1, JSP built-in objects:-a reference that can be used directly in a JSP's Java code block, an expression block, and so on, called a built-in object of a JSP. There are 9 commonly used built-in objects, namely:650) this.width=650; "src=" Https://s4.51cto.com/oss/201710/20/32cacd3b3bfe2a3b3235e49f6ee2ad93.png "title=" 00.png "alt=" 32cacd3b3bfe2a3b3235e49f6ee2ad93.png "/>-These nine objects can be used direct
Simple JSP exercises-JSP commands, jsp-jsp commands
I. page commands:
When defining the global attribute value of a JSP page, you can use the page command to place it in the header of the page. For example:
Note: The contentType attribute in the page command cannot be speci
The JSP page consists of the following elements: l static content. The static content is the static text in the JSP page. It is basically HTML text and has nothing to do with Java and JSP syntax. L command. JSP commands generally use "L JSP script elements include declaratio
Introduction to jsp commands and jsp actions and jsp tag commands
Jsp tags are divided into jsp commands and jsp actions.
Jsp command element: the command element provides global infor
Today in doing homework encountered a problem, before we write JSP code is placed in the webcontext directory, not placed under its subdirectory under the wed-inf directory, all causes the browser can directly access the JSP, So there is a great security problem, after understanding, the correct wording is to put the JSP file under the Wed-inf directory, and then
JSP cannot be accessed directly through a browser. It must be redirected through servlet. However, the
Today, when doing the job encountered a problem, before we write jsp code is put under the webcontext directory, not put in its subdirectory under the WED-INF directory, all lead to the browser can directly access jsp, so there is a lot of security issues, afte
I. JSP running principle when each JSP page is accessed for the first time, the WEB Container will send the request to the JSP Engine (a Java program) for processing. The JSP Engine first translates JSP into a _ jspServlet (essentially a servlet) and calls it according to th
JSP learning notes (1): JSP basics and jsp learning notes BasicsI. Principles1. HttpServlet is first compiled from the source code into a class file and then deployed to the server. Compile and deploy the SDK. 2. JSP first deploys the source code and then compiles it into the class file, and then compiles it.
Each time the JSP page is refreshed the corresponding output resultsCount incremented by 1 per refreshCount2 Every time the refresh is not changedAnalysis:Because count is a variable declared in a JSP, when the JSP is compiled into a servlet, cout is a member variable of the Servlet object, and the Servlet object is destroyed by invoking the Destroy () method bas
A. JSPprinciple: JSP is actually a servlet.Servlet responsible for business logic processing, JSP is only responsible for display. In development, there cannot be a single line of Java code in the JSPTwo JSP Syntax1. jsp template elements: HTML tags and text in JSP2. Script: Write Java code, 3. expression: For output
The project has multiple JSP pages that use the same JSP page content. Therefore, I use JSP pages embedded with JSP pages. However, when the two JSP pages are opened in the browser, the style exists, and the style is lost after the page is embedded. When the two
Project scenario:One of the Window,window embedded in the a.jsp is a At this time, can be in b.jsp JS in the Parent.funa () to invoke the Funa method in a.jsp;The parent page invokes the method in the child page in the IFRAME:' window.frames[' Childpage "].SONFF ();Calling a function in a parent JSP or a parent JSP in a child JSP page calling a function in a chil
JSP is the extension of the servlet, before the JSP, there has been the servlet technology. The servlet uses output streams to dynamically generate HTML pages, including each HTML tag and each content that appears in an HTML page.
The development efficiency of the servlet is extremely low due to the large number of HTML tags, a large number of static text passes, etc. All of the presentation logic, includin
Obtains the bean property value, which is displayed on the page.
JSP syntax
Beaninstancename"Property ="Propertyname"/>
Example
Calendar
Description
The
You cannot use
You can use Bean.
Attribute
Name ="Beaninstancename"Bean name, specified by
Property ="Propertyname"Attribute name of the specified bean.
TIPS:
As mentioned in Sun's
A common mistake is to think of JSP as a simplified Java. It's not, (in fact, JSP is a simplified servlets.) Programmers usually try to learn JSP directly without the support skills they need to learn. JSP is a cohesive technology that successfully connects to other technologies that you need to understand. If you alre
Contains a static or dynamic file.
JSP syntax
Relativeurl| Expression% >}" Flush = "true"/>
Or
Relativeurl| Expression% >}" Flush = "true">
Parametername"
Value = "{Parametervalue| Expression% >}"/> +
Example
Description
You cannot determine whether a file is dynamic or static from the file name, suchAspcn. asp
It may only contain some information and does not need to be
One, servlet declaration cycleThe 1.Servlet declaration cycle is generally divided into four steps: Load, instantiate, service, destroy.2. Instantiation is performed only once throughout the life cycle.Second, JSP1.Servlet providing data to the JSPRequest.setattribute (,);Example: Request.setattribute ("Key", "Hello");2.Servlet Jump JSP(1) Same request method: Request.getrequestdispatcher ("/path"). Forward (request, response);The request jump can onl
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.